# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Jenneron <jenneron@protonmail.com>
pkgname=device-google-kukui
pkgdesc="Google Kukui Chromebooks"
pkgver=9
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	alsa-ucm-conf-cros
	depthcharge-tools
	linux-postmarketos-mediatek-mt8183>=6.1.28-r0
	postmarketos-base
	postmarketos-cros-common
	soc-mediatek-mt8183
"
makedepends="devicepkg-dev"
source="deviceinfo modules-initfs"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"

# provides and replaces to switch old installations to this package
provides="
	device-google-burnet=$pkgver-r$pkgrel
	device-google-cerise=$pkgver-r$pkgrel
	device-google-cozmo=$pkgver-r$pkgrel
	device-google-damu=$pkgver-r$pkgrel
	device-google-fennel=$pkgver-r$pkgrel
	device-google-fennel14=$pkgver-r$pkgrel
	device-google-juniper=$pkgver-r$pkgrel
	device-google-kakadu=$pkgver-r$pkgrel
	device-google-kappa=$pkgver-r$pkgrel
	device-google-katsu=$pkgver-r$pkgrel
	device-google-kenzo=$pkgver-r$pkgrel
	device-google-kodama=$pkgver-r$pkgrel
	device-google-krane=$pkgver-r$pkgrel
	device-google-makomo=$pkgver-r$pkgrel
	device-google-stern=$pkgver-r$pkgrel
	device-google-willow=$pkgver-r$pkgrel
"
replaces="
	device-google-burnet
	device-google-cerise
	device-google-cozmo
	device-google-damu
	device-google-fennel
	device-google-fennel14
	device-google-juniper
	device-google-kakadu
	device-google-kappa
	device-google-katsu
	device-google-kenzo
	device-google-kodama
	device-google-krane
	device-google-makomo
	device-google-stern
	device-google-willow
"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="WiFi/BT firmware"
	depends="linux-firmware-ath10k linux-firmware-qca linux-firmware-mediatek"
	mkdir "$subpkgdir"
}

sha512sums="
563b0c9ee35c90f2be74e30fa6d490a351e5e114f946c21556f00b621bfd5c756599eef5228dad8cf74c258eb8eb9e12f8012058da285ddff7834820cad5fc7e  deviceinfo
8e95624610dae7d18684056396c9e82635ddce7303d6770e965f9372ffa101fdfd5f8337bc7368004890e9836798663a98c142c52ed63795877ea37ac8da56af  modules-initfs
"
